import time
import logging
from gensim.models import word2vec
import pkg_resources

def load_w2v_model(model_name):
    starttime = time.time()
    #w2v_model_path = pkg_resources.resource_filename(__name__, '../source/word2vecotr/' + model_name)
    w2v_model = word2vec.Word2Vec.load('./source/word2vector/' + model_name)
    endtime = time.time()
    logging.info('加载w2v模型耗时：%.2f s' %(endtime-starttime,))
    return w2v_model   
    